package com.neusoft.elmboot.controller;

import com.neusoft.elmboot.po.Business;
import com.neusoft.elmboot.service.BusinessService;
import com.neusoft.elmboot.service.UserBusinessService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/UserBusinessController")
public class UserBusinessController {
    @Autowired
    private UserBusinessService userBusinessService;
    @Autowired
    private BusinessService businessService;

    @RequestMapping("/getBusinessByUserId")
    public List<Business> getBusinessByUserId(String userId) {
        return userBusinessService.getBusinessIdByUserId(userId);
    }
}
